'use strict';

const Controller = require('egg').Controller;

class WechatController extends Controller {
  //微信校验签名
  async Verification () {
    let { ctx } = this
    const res = await this.service.wechat.verification();
    if (res) return ctx.body = res
    ctx.body = ''
  }
  //微信消息接收/回复
  async Message () {
    let { ctx } = this
    const res = await this.service.wechat.Message();
    return ctx.body = res
  }
}

module.exports = WechatController;
